<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>ESI质谱同系数据比对工具</title>
		<link charset="utf-8" rel="stylesheet" href="__PUBLIC__/static/asset/bootstrap/3.3.6/css/bootstrap.min.css">
		
        <style>
        	.no-padding-right{
        		padding-right : 0!important;
        	}
        	.no-padding-left{
        		padding-left: 0!important;
        	}
            .jumbotron{
            	padding-top: 15px !important;
            	padding-bottom: 15px !important;
                margin-bottom: 5px;
            }
			.current{
				background: #c12e2a;
				color: #ffffff;
			}
        </style>
	</head>
	<body>
		<div class="container-fluid">
			<div class="row">
				<div class="jumbotron">
					<h4><a href="{:config('base')}/index.php"><i class="glyphicon glyphicon-home"></i></a> ESI质谱同系数据比对工具
						<a href="#" data-toggle="modal" data-target="#help-modal"><i class="glyphicon glyphicon-question-sign"></i></a>
					</h4>
					<form id="form-data" action="{:url('esi_result')}" method="post" class="form-horizontal" onsubmit="return false;">
						<div class="form-group">
                            <label class="col-md-2 control-label">离子模式：</label>
                            <div class="col-md-3 radio">
                                <label><input type="radio" value="1" name="n" checked>正离子</label>
                                <label><input type="radio" value="-1" name="n">负离子</label>
                            </div>
                            <label class="col-md-2 control-label">质荷比(m/z 50-2000)：</label>
                            <div class="col-md-3">
                                <input type="text" name="mz" id="mz" title="m/z值" class="form-control">
                            </div>
                            <div class=" col-md-1  col-sm-2 col-xs-12">
                                <button id="calculate-button" type="button" class="btn btn-primary pull-right"> 计算ms值 </button>
                            </div>
						</div>
				   </form>
				<div id="message-show" class="alert alert-danger hidden" role="alert">警告内容</div>
				</div>
				<!--
                	/.col-md-12
                -->
			</div>
			<!-- /.row -->
			
			<div class="container">
				<div id="result-show" class="col-md-12 hidden">
					<div class="title hidden"><h3>计算结果</h3></div>
					<div class="body" id="result-body">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <td>假定Z值</td>
                                <td>ms值</td>
                                <td>假定Z值</td>
                                <td>ms值</td>
                            </tr>
                            </thead>
                            <tbody id="esi-tbody"></tbody>
                        </table>
                        <table class="table table-bordered" id="ms-result"></table>
                    </div>
				</div>
			</div>
		</div>

		<div class="modal fade" id="help-modal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title">ESI质谱同系数据对比工具说明</h4>
					</div>
					<div class="modal-body">
						<div>
                            1.在质谱图分析过程中，本软件可简化质谱分析过程。<br>
                            2.选择ESI检测模式：正离子检测或负离子检测。<br>
                            3.输入ESI质谱图上的m/z值，并勾选可能的Z值（假定Z值）。<br>
                            4.软件自动计算所选Z值所对应的m/z值。<br>
                            5.如果在质谱图上能找到Z-1和Z+1所对应的m/z值（即同系数据），基本确定上述假定Z值是正确的。<br>
                            6.何为同系数据，即一种物质由于带上不同电荷后，在质谱图上的表现出的一组m/z值。比如MS为3000的物质，用正离子模式检测时，质谱图上的m/z值为：1501、1001、751。此即为同系数据。

						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

        <script id="esi-td-template" type="text/html">
                <td class="col-md-2">
                    <label style="display:block; cursor: pointer;"><input type="radio" name="z" value="{{d.index_z}}" title="{{d.index_z}}">
                    {{d.index_z}}
                    </label>
                </td>
                <td class="col-md-4">{{d.value}}</td>
        </script>

			
		<script src="__PUBLIC__/static/sea.js"></script>
		<script src="__PUBLIC__/static/skin/default/config.js"></script>
		
		<script>
			seajs.use('skin/default/esi', function(esi){
				esi.init();
			})
		</script>
	</body>
</html>
